home *** CD-ROM | disk | FTP | other *** search
- unit Isam_key;
- {Copyright 1995 by Norbert Stellberg GmbH}
-
- {this unit contains the dialog to set the key for an isamtable}
-
- interface
-
- uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
- StdCtrls, ExtCtrls;
-
- type
- TIsamKeyDialog = class(TForm)
- {don't call this dialog directly, you better start it
- by the procedure KEY_EINSTELLEN(..), described later
- in this file}
- OKBtn: TBitBtn;
- CancelBtn: TBitBtn;
- Bevel1: TBevel;
- ComboBox1: TComboBox;
- end;
-
- var
- IsamKeyDialog: TIsamKeyDialog;
-
- Procedure Key_Einstellen(aParent: TForm; var aKey: Integer; Liste: TStringList);
- {call this procedure in order to set another key for your isamtable
- with the following parameters:
- APARENT: the form, from which you start the dialog
- AKEY : the actual key, e.g. ISAMTABLE1.KEYNO
- LISTE : a stringlist, that contains the names of the possible keys,
- for example if you have 3 keys, key1 on field NAME1,
- key2 on field ZIP and key3 on fields NAME1+NAME2, you must
- create a stringlist, add the names of the keys, before you
- call this procedure:
- procedure T2Dialog.KeyBttnClick(Sender: TObject);
- var Liste: TStringList;
- Key1: Integer;
- begin
- Key1:= T2DialogTable.KeyNo;
- Liste:= TStringList.Create;
- Liste.Add('NAME1');
- Liste.Add('ZIP');
- Liste.Add('NAMES1+2');
- Key_Einstellen(Self,Key1,Liste);
- T2DialogTable.KeyNo:= Key1;
- Liste.Free;
- IsamBrowser1.KeyNumber := Key1;
- Key_Speichern(GetAppName,IsamBrowser1.Name,T2DialogTable.KeyNo);
- IsamBrowser1.SetAndUpdateBrowserScreen('', 0);
- end;}
-
- Procedure Key_Speichern(IniName,BrowserName: String; aKey: Integer);
- {to save the settings for your isamtable's key in an inifile,
- you can use this procedure with the following parameters:
- ININAME: the name of the application's inifile, e.g. TEST.INI
- BROWSERNAME: the name of the section in the inifile, under which
- you store the settings, e.g. BROWSER1 (without
- brackets ... the section [BROWSER1] will be created.}
-
- Implementation
-